print('pass: print')
BLACKSMITH.element(document.body, 'div', ['pass: blacksmith.element'])

var f = BLACKSMITH.File('user/uppenwho/test.test')

f.write('test: file')

f.close(function(m){
    if (BLACKSMITH.isError(m))
        BLACKSMITH.element(document.body, 'div', ['fail: file write'])

    else {

        BLACKSMITH.element(document.body, 'div', ['pass: file write'])
        f = BLACKSMITH.File('user/uppenwho/test.test')
        f.read(function(m){
            if (BLACKSMITH.isError(m))
                BLACKSMITH.element(document.body, 'div', ['fail: file read'])
            else
                BLACKSMITH.element(document.body, 'div', ['pass: file read [' + m.file.content + ']'])
        })

    }

})

